<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/WEB-INF/struts-tags.tld"%>
<%@ taglib uri="/comp" prefix="comp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>欢迎访问产品运营互动中心！</title>
		<%@ include file="/commons/include/head-meta.inc.jsp"%>
		<script type="text/javascript">
			function opAttrValid(isReuire){
				var idsArr=['#advanceTimeId','#reqContentId'];
				$.each(idsArr,function(index,objId){
					$(objId).attr('require',isReuire);;
				});
				
				var uploads=$("input[name='uploads']");
				$.each(uploads,function(index,obj){
					if($(obj).val()==''){
						$(obj).attr('require',isReuire);
					}
				});
			}
		
		</script>	
	</head>
	<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
	<form name="applyForm" action="newBusinessReq_saveStartFlow.action" method="post" enctype="multipart/form-data">
		<input type="hidden" name="processId" value="${processView.processConfig.id }"/>
		<input type="hidden" id="isCommitId" name="isCommit" value=""/>
		<table width="980" border="0" cellspacing="0" cellpadding="0"
			align="center">
			<tr>
				<td>
					<table width="100%" border="0" cellpadding="0" cellspacing="0" background="<s:url value="/images/new/gxzl_index_2.gif"/>">

						<tr>
							<td width="20" height="32">
								&nbsp;
							</td>
							<td width="20">
								<img src="<s:url value="/images/new/dq_dot.gif"/>" width="15" height="12" />
							</td>
							<td>
								当前位置：
								<font color="#003399">业务需求交互单</font>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td background="" class="leftbg">
					<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
						<tr>
							<td width="20%" valign="top">
								<div style="margin-left: 20px;margin-top: 5px;margin-bottom: 5px">
									<button onclick="opAttrValid('false');commitForm('flowReq_saveStartFlow.action',false);" style="margin-right: 6px">保存</button>
									<button onclick="opAttrValid('true');commitForm('flowReq_saveStartFlow.action',true);" style="margin-right: 6px">提交</button>
									<button id="backHistoryBtn" type="button" onclick="javascript:history.go(-1);" style="margin-right: 6px">返回</button>
								</div>
								<table width="96%" border="0" cellspacing="0" cellpadding="0"
									align="center" bgcolor="#FFFFFF">
									<tr>
										<td valign="top" align="center">
												
												<table width="100%" border="0" cellspacing="0"
													cellpadding="7" align="center" class=tablecolor2>
													<tr>
														<td background="<s:url value="/images/catalog_manage_bbs_3.gif"/>"
															colspan="4">
															<span style="margin-top: 0px; margin-left: 14px">
																<img src="<s:url value="/images/catalog_manage_12.gif"/>" width=13 height=13 alt="">
															</span>
															<strong>流程信息</strong>
														</td>
													</tr>
													<tr>
														<td width="14%" bgcolor="D6E3FA">
															<div align="right" class="STYLE2">
																当前状态：
															</div>
														</td>
														<td width="36%">${processView.startNode.name }</td>
														<td bgcolor="D6E3FA" width="14%">
															<div align="right" class="STYLE2">
																当前办理人：
															</div>
														</td>
														<td width="36%">${LOGINUSER_CONTEXT.currUser.person.name }
														</td>
													</tr>
													<tr>
														<td bgcolor="D6E3FA" width="14%">
															<div align="right" class="STYLE2">
																当前流程：
															</div>
														</td>
														<td colspan="3">${processView.processConfig.name }
														</td>
													</tr>
			
													<tr>
														<td bgcolor="D6E3FA" width="14%">
															<div align="right" class="STYLE2">
																<font color="red">*</font>下一步骤：
															</div>
														</td>
														<td colspan="3">
															
															<li style="padding: 0;list-style: upper-roman">
															<select name="taskNodeId" style="width:120px;" >
																<s:iterator value="#request.processView.childTaskNodeList">
																<option value="<s:property value="id"/>"><s:property value="name"/></option>
																</s:iterator>
															</select>
															
															
															<select name="userId" id="taskAssign-userId" style="width:180px" dataType="Require" msg="*">
																<option value="">--请选择--</option>
																<s:iterator value="#request.processView.childTaskNodeList">
																<s:iterator value="personList">
																<option value="<s:property value="id"/>"><s:property value="name"/></option>
																</s:iterator>
																</s:iterator>
															</select>
															</li>
														</td>
													</tr>													

												</table>

												<table width="100%" border="0" cellspacing="0"
													cellpadding="7" align="center" class=tablecolor2>
													<tr>
														<td background="<s:url value="/images/catalog_manage_bbs_3.gif"/>"
															colspan="4">
															<span style="margin-top: 0px; margin-left: 14px">
																<img src="<s:url value="/images/catalog_manage_12.gif"/>" width=13 height=13 alt="">
															</span>
															<strong>基本信息</strong>
														</td>
													</tr>
													<tr>
														<td bgcolor="D6E3FA" width="14%">
															<div align="right" class="STYLE2">
																<font color="red">*</font>名&nbsp;&nbsp;&nbsp;&nbsp;称：
															</div>
														</td>
														<td colspan="3">
															<input type="text" name="prodAdvReq.name" maxlength="128" dataType="Require" msg="必填" style="width: 90%;" value="${prodAdvReq.name}"/>
														</td>
													</tr>
													<tr>
														<td bgcolor="D6E3FA" width="14%">
															<div align="right" class="STYLE2">
																发 起 人：
															</div>
														</td>
														<td width="36%">
															<select name="prodAdvReq.startPerson.id" style="width:120px;display:none" id="startPersonId" dataType="Require" msg="必选">
																<option value="${prodAdvReq.startPerson.id}">${prodAdvReq.startPerson.name}</option>
															</select>
															
															${prodAdvReq.startPerson.name}
														</td>
														<td bgcolor="D6E3FA" width="14%">
															<div align="right" class="STYLE2">
																发起部门：
															</div>
														</td>
														<td width="36%">
															${prodAdvReq.startDept.fullName}
														</td>
													</tr>
													<tr>
														<td bgcolor="D6E3FA">
															<div align="right" class="STYLE2">
																需求单号：
															</div>
														</td>
														<td>
															<input type="text" name="prodAdvReq.reqCode" value="${prodAdvReq.reqCode}" class="input_nob" size="40" readonly />
														</td>
														<td bgcolor="D6E3FA">
															<div align="right" class="STYLE2"></div>
														</td>
														<td>
														</td>
													</tr>
													<tr>
														<td bgcolor="D6E3FA">
															<div align="right" class="STYLE2">
																<font color="red">*</font>期望完成时间：
															</div>
														</td>
														<td>
															<input id="advanceTimeId" type="text" name="prodAdvReq.advanTime" class="Wdate" style="height:22px;width: 120px" onFocus="WdatePicker({isShowClear:false,readOnly:true})" value="<s:date name="businessRequest.advanTime" format="yyyy-MM-dd" />" dataType="Require" msg="必填"/>
															
														</td>
														<td bgcolor="D6E3FA" width="14%">
															<div align="right" class="STYLE2">
																发起时间：
															</div>
														</td>
														<td width="36%">
															<s:date name="prodAdvReq.begin" format="yyyy年MM月dd日" />
														</td>
													</tr>
													<tr>
														<td bgcolor="D6E3FA" width="14%">
															<div align="right" class="STYLE2">
																<font color="red">*</font>产品经理：
															</div>
														</td>
														<td width="36%">
															<select name="prodAdvReq.prodPerson.id" style="width:180px" id="prodPersonId" dataType="Require" msg="必选">
																<option value="${prodAdvReq.prodPerson.id}">${prodAdvReq.prodPerson.name}</option>
																<s:iterator value="#request.prodList">
																<option value="${id }">${name }</option>	
																</s:iterator>
															</select>
															<%-- 
															<button type="button" onclick="selectMainPerson('prodPersonId')" style="margin-left: 5px">选择人员</button>
															--%>
														</td>
														<td bgcolor="D6E3FA">
															<div align="right" class="STYLE2">
																产品部门：
															</div>
														</td>
														<td>${prodAdvReq.prodDept.name}</td>
													</tr>
													<tr>
														<td bgcolor="D6E3FA" width="14%">
															<div align="right" class="STYLE2">
																需求类别：
															</div>
														</td>
														<td width="36%">
															<s:select name="prodAdvReq.type.id" list="types" listKey="id" listValue="name" theme="css_xhtml" />
														</td>
														<td bgcolor="D6E3FA">
															<div align="right" class="STYLE2">
																重要性：
															</div>
														</td>
														<td>
															<s:select name="prodAdvReq.importance.id" list="importances" listKey="id" listValue="name" theme="css_xhtml" />
														</td>
													</tr>
													<tr>
														<td bgcolor="D6E3FA">
															<div align="right" class="STYLE2">
																<font color="red">*</font>内&nbsp;&nbsp;&nbsp;&nbsp;容：
															</div>
														</td>
														<td colspan="3">
															<textarea id="reqContentId" name="prodAdvReq.content" style="width: 99%;height: 80px" dataType="LimitB" min="1" max="4000" msg="必填"></textarea>
															<font color="red">2000个汉字之内</font>
														</td>
													</tr>
													<tr>
														<td width="111" bgcolor="D6E3FA">
															<div align="right" class="STYLE2">
																附&nbsp;&nbsp;&nbsp;&nbsp;件：
															</div>
														</td>
														<td colspan="3">
															【<a href="appDocTemplete_findDocList.action" target="_blank" style="color: red;">文档模板下载</a>】
															<table width="99%" border="0" class=tablecolor2>
										                        <tr>
										                          <td width="" colspan="2" align="left" bgcolor="D6E3FA">
										                          	附件上传&nbsp;&nbsp;&nbsp;
										                          </td>
										                        </tr>
										                        <tr>
										                          <s:iterator value="#request.processView.documentTypes">
										                          <td style="text-align: right">
										                            <font color="red">*</font><s:property value="name"/>：
										                          	<input type="hidden" id="filetype" name="filetype" value="<s:property value="id"/>"/>
										                          </td>
										                          <td><input type="file" name="uploads" size="40" dataType="Require" msg="请选择要上传的文件"/>
										                          </td>
										                          </s:iterator>
										                        </tr>
										                        <jsp:include page="inc/taskDocOtherFile.inc.jsp"></jsp:include>										                        
													        </table>
													        															
														</td>
													</tr>
												</table>
																							
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		</form>
	</body>
</html>